package org.theqcp.wow.model.player.classes.shaman;

import org.theqcp.wow.model.exceptions.PlayerRaceNotAllowedException;
import org.theqcp.wow.model.mechanics.Race;
import org.theqcp.wow.model.player.Player;
import org.theqcp.wow.model.player.Talent;
import org.theqcp.wow.model.player.TalentFactory;

public class Shaman extends Player {

    @Override
    public void recalc() {
	// call super
	super.recalc();

	// do talents!
	for( Talent t: this.getTalents() ) {

	    // calculate stats
	    t.calculateStats(this);

	}

	// do health!

	// do mana!

    }

    @Override
    public void setRace( Race r ) throws PlayerRaceNotAllowedException {
	switch( r ) {
	    case DRAENEI:
	    case ORC:
	    case TAUREN:
	    case TROLL: {
		super.setRace(r);
		break;
	    }
	    default: {
		throw new PlayerRaceNotAllowedException("Race " + r + " not allowed for " +
		    this.getClass().getSimpleName());
	    }
	}
    }

    @Override
    protected TalentFactory getTalentFactory() {
	return super.getTalentFactory();
    }

}
